<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/style.css">
		<script src="/inc/js/ccorrect_btn.js"></script>

		<title>添加用户组</title>
		<script>
function CheckForm()
{
   if(document.form1.dlyhmc.value=="")
      {
          alert("用户名不能为空！");
          document.form1.dlyhmc.focus();
          return false;
      }
    if(document.form1.dlyhmm.value=="")
    {
          alert("密码不能为空！");
          document.form1.dlyhmm.focus();
          return false;
    }
      document.form1.submit();
}
function checkdlyhmm()
{
   // if(document.form1.dlyhmm.value.length<6)
   // {
         // alert("密码太短，请输入6位以上！");
         // document.form1.dlyhmm.focus();
         // return false;
   //}
}
</script>
	</head>
	 <script language="javascript" type="text/javascript" src="js/qy1.js"></script>
	<body onload="loaddw();selectedaddr()" class="bodycolor" topmargin="5">
	<%Dlyh dlyh = (Dlyh)request.getSession().getAttribute("dlyh");  %>
	<input type="hidden" value="<%=dlyh.getZd().getParentid() %>" id="qyid" name="qyid" />
  <input type="hidden" value="<%=dlyh.getZd().getTypename() %>:<%=dlyh.getZd().getId() %>:<%=dlyh.getZd().getParentid() %>" id="dlyhzd" name="dlyhzd" />
  <input type="hidden" value="<%=request.getAttribute("shi") %>" id="shiid" name="shiid" />
  <input type="hidden" value="<%=request.getAttribute("xian") %>" id="xianid" name="xianid" />
  <input type="hidden" value="<%=request.getAttribute("xiang") %>" id="xiangid" name="xiangid" />
  <input type="hidden" value="<%=request.getAttribute("cun")%>" id="cunid" name="cunid" />
  <input type="hidden" value="<%=request.getAttribute("xianzhi") %>" id="xianzhi" name="xianzhi" />
		<form action="dlyh.do?state=saveadd" name="form1" method="post">
			<table class="TableBlock" width="70%" align="center">
				<tr>
					<td nowrap class="TableContent" width="80">
						用户名：
					</td>
					<td class="TableData">
						<input type="text" name="dlyhmc" onblur="checkdlyhmc(this.value)"
							id="dlyhmc" size="30" class="BigInput">
						<span name="dlyhmc_error" id="dlyhmc_error"
							style="color: red; display: none">用户名已存在</span>
					</td>
				</tr>
				<tr>
					<td nowrap class="TableContent" width="80">
						密码：
					</td>
					<td class="TableData">
						<input type="password" name="dlyhmm" id="dlyhmm" size="30"
							onblur="checkdlyhmm()" class="BigInput">
					</td>
				</tr>
				<tr>
					<td nowrap class="TableContent" width="80">
						真实姓名：
					</td>
					<td class="TableData">
						<input type="text" name="zsxm" id="zsxm" size="30"
							class="BigInput">
					</td>
				</tr>
				<tr>
					<td nowrap class="TableContent" width="80">
						联系方式：
					</td>
					<td class="TableData">
						<input type="text" id="lxfs" name="lxfs" size="30"
							class="BigInput">
					</td>
				</tr>
				<tr>
					<td nowrap class="TableContent" width="80">
						所属部门：
					</td>
					<td class="TableData" >
         <select disabled="disabled" id="sheng" name="sheng" >
           <option value="河北省">河北省</option>
        </select>省
        <select id="shi" name="shi" onchange="shichange(this.value)">
           <option>请选择市</option>
           <%List xianlist=(List) request.getSession().getAttribute("shilist"); 
            for(int i=0;i<xianlist.size();i++){%>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>市
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option>请选择县</option>
        </select>县
        <!-- 
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option >请选择县</option>
        <%//List xianlist=(List) request.getSession().getAttribute("zdidlist"); 
          //for(int i=0;i<xianlist.size();i++){
        %>
           <option value="<%//=((Zd)xianlist.get(i)).getId() %>"><%//=((Zd)xianlist.get(i)).getTypename() %></option>
           <%//} %>
        </select>县 -->
        <select id="xiang"  name="xiang" onchange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun"  name="cun" style="display: none">
        <option >请选择村</option>
        </select>
						<!-- <input type="text" class="SmallInput" id="bm" name="bm" onclick="openwindow(1)" readonly="readonly"></input>
						<a href="javascript:openwindow(1);">选择</a>
                        <input type="hidden" id ="bmbh" name="bmbh" /> -->
					</td>
				</tr>
				<div id="a" name="a">
				<tr>
					<td nowrap class="TableContent" width="80">
						是否专职：
					</td>
					<td class="TableData">
						<input type="radio" value="0" name="sfzz" id="sfzz">
						是
						<input type="radio" value="1" name="sfzz" id="sfzz"
							checked="checked">
						否
					</td>
				</tr>

				<tr>
					<td nowrap class="TableControl" colspan="2" align="center">
						<input type="button" value="添加" class="BigButton" title="提交数据"
							name="button1" OnClick="CheckForm()">
						&nbsp&nbsp&nbsp&nbsp
						<input type="button" value="返回" class="BigButton" title="返回"
							name="button2"
							OnClick="location.href='javascript:history.go(-1);'">
					</td>
				</tr>
			</table>
		</form>
		<script type="text/javascript">
  function openwindow(str)
{
  window.open("doTree.jsp?sid="+str+"&pd=","部门","height=380,width=260,top=230,left=250,scrollbars=yes"); 
   //showModalDialog("doTree.jsp","部门","height=380,width=260,top=230,left=250,scrollbars=yes");
}
</script>
	</body>
</html>
